$(function(){
	$("table").css({
		"border":"1px solid #aaa",
		"margin":"0px auto"
	});
	
	$("td").css({
		"border":"1px solid #aaa",
		"padding":"2px 5px"
	});
	
	// 修改按钮
	$("input[name='update']").unbind("click").bind("click",function(){
		var userId = $(this).parent().parent().find(".userId").html();
		window.location = "update.jsp?updateId=" + userId;
	});
	
	// 删除按钮
	$("input[name='delete']").unbind("click").bind("click",function(){
		var userId = $(this).parent().parent().find(".userId").html();
		window.location = "delete.action?deleteId=" + userId;
	});
	
	// 查看按钮
	$("input[name='info']").unbind("click").bind("click",function(){
		var userId = $(this).parent().parent().find(".userId").html();
		window.location = "search.action?searchId=" + userId;
	});
	
	
	// 分页按钮
	$(".pages").unbind("click").bind("click", function(){
		var curr = $(this).html();
		$.ajax({
			url:"showAll.action",
			type:"post",
			data:"curr="+curr,
			dataType:"html",
			async:true,
			success:function(result){
				$("#fy").html(result);
			}
		});
	});
	
});